import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

/**
 * @author gao
 * @date 2025/9/12 8:15
 */

public class Solution {
    public String[] hash = {"", "", "abc", "def", "ghi", "jkl", "mno", "pqrs", "tuv", "wxyz"};
    public StringBuffer path;
    public List<String> ret;
    public List<String> letterCombinations(String digits) {
        path = new StringBuffer();
        ret = new ArrayList<>();
        if (digits.length() == 0) {
            return ret;
        }
        dfs(digits, 0);
        return ret;
    }

    private void dfs(String digits, int pos) {
        if (pos == digits.length()) {
            ret.add(path.toString());
            return;
        }
        String index = hash[digits.charAt(pos) - '0'];
        for (int i = 0; i < index.length(); i++) {
            path.append(index.charAt(i));
            dfs(digits, pos + 1);
            path.deleteCharAt(path.length() - 1);
        }
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            String digits = in.nextLine();
            Solution solution = new Solution();
            System.out.println(solution.letterCombinations(digits));
        }
    }
}